package simulation;

public class Event implements Comparable {
	double time;			/* simulated time at which this event should happen */
	EventHandler handler;	/* handler of the event */

	public Event(double time, EventHandler handler){
		this.time = time;
		this.handler = handler;
	}
	
	public int compareTo(Object e) {
		double time2 = ((Event)e).time;
		if (this.time < time2)
			return -1;
		else if (this.time > time2)
			return 1;
        return 0;
	}
}
